var configController={
	controller:null,
	userData:null,
	initialize:function(controller,userData){
		this.controller=controller;
		this.userData=userData;
		this.dialogLoad();
    },
	dialogLoad:function(){ 
		var username = document.getElementById("ap-username");
		username.value=this.userData.userName;
		var password = document.getElementById("ap-password");
		password.value=this.userData.password;
	},
    
	dialogSave:function(){
		var username = document.getElementById("ap-username").value;
		var password = document.getElementById("ap-password").value;
		this.userData.password = password;
		this.userData.userName = username;
		this.controller.writeUserData();
	}
}

configController.initialize(gController,userData);
